home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 025a / gsdb25.zip / DB_XPL03.PAS < prev    next >
Pascal/Delphi Source File  |  1990-11-28  |  1KB  |  40 lines

  1. program DB_Xpl03;
  2. uses
  3.    CRT,
  4.    DOS,
  5.    GS_KeyI,
  6.    GS_dBFld,
  7.    GS_dBase;
  8. var
  9.    Health  : GS_dBFld_Objt;
  10.  
  11. procedure DisplayRecord;
  12. begin
  13.    Health.FieldDisplay('FOOD','Name of Food: ',1,1);
  14.    Health.FieldDisplay('QUANTITY','Quantity: ',1,2);
  15.    Health.FieldDisplay('UNITTYPE','Type of Unit: ',1,3);
  16.    Health.FieldDisplay('CALS','Calories: ',1,4);
  17.    Health.FieldDisplay('TOT_FAT_G','Total Fat: ',1,5);
  18.    Health.FieldDisplay('SAT_FAT_G','Saturated Fat: ',1,6);
  19.    Health.FieldDisplay('CHOLES_MG','Cholesterol per Mg: ',1,7);
  20.    Health.FieldDisplay('COMMENTS','Comments: ',1,8);
  21. end;
  22.  
  23. begin
  24.    ClrScr;
  25.    GotoXY(1,10);
  26.    write('Press ESC to stop, any other key to continue');
  27.    Health.Init('HEALTH');
  28.    Health.Open;
  29.    Health.Index('FOODNAME');
  30.    Health.GetRec(Top_Record);
  31.    while not Health.File_EOF do
  32.    begin
  33.       DisplayRecord;
  34.       WaitForKey;
  35.       if GS_KeyI_Chr = Kbd_Esc then halt;
  36.       Health.GetRec(Next_Record);
  37.    end;
  38.    Health.Close;
  39. end.
  40.